package skkj;

/**
 * 静态内部类实现懒汉单例：利用静态内部类的懒加载
 */
public class Singleton3 {
    private Singleton3() {};
    private static class Mysingleton {
        private static final Singleton3 instance = new Singleton3();
    }
    public Singleton3 getInstance() {
        return Mysingleton.instance;
    }
}
